import axios from "axios"
export let getlist =()=>{
    return (dispatch)=>{
        axios.get("/shoplist").then(res=>{
            dispatch({
                type:"getlist",
                payload:res.data
            })
        })
    }
}
export let addshop = (item)=>{
    return {
        type:"addshop",
        payload:item
    }
}
export let addFn = (id)=>{
    return {
        type:"addFn",
        payload:id
    }
}
export let delFn = (id)=>{
    return {
        type:"delFn",
        payload:id
    }
}
export let changeall = ()=>{
    return {
        type:"changeall",
    }
}
export let checkItem = (id)=>{
    return {
        type:"checkItem",
        payload:id
    }
}
export let addaddress = (item)=>{
    return {
        type:"addaddress",
        payload:item
    }
}
export let deLFn = (index)=>{
    return {
        type:"deLFn",
        payload:index
    }
}
export let editaddress = (item)=>{
    console.log(item,11111);
    return {
        type:"editaddress",
        payload:item
    }
}